import React from 'react'
import ReactDOM from 'react-dom'
import mirror, {actions, connect, Link} from 'mirrorx'
import {FormattedMessage} from 'react-intl'

class App extends React.Component {
  constructor (props) {
    super(props)

    this.policyId = T.urlQuery('orderNo') || '2018222948488449'
  }

  componentDidMount () {
    T.setColor()
  }

  render () {
    return (<div className='tac success-page mb30'>
      <div className='success-wrap'>
        <img src='/assets/images/icon_right.png' />
      </div>
      <div className='f34 fc6'>
        <FormattedMessage id='pay_success' defaultMessage='支付成功' />
      </div>
      <div className='mt30 fc8 f24'>
        <FormattedMessage id='order_number' defaultMessage='订單號' />：{this.policyId }
      </div>
      <div className='btn-div'>
        <div className='page-btn-1 f28 diy_background' onClick={() => { location.href = '/policy-list-yj-en' }}>
          <FormattedMessage id='view_order' defaultMessage='查看订單' />
        </div>
      </div>

      <div className='mt40'>
        <div className='page-btn-3 f28 diy_color diy_border' onClick={() => { location.href = '/product-list-yj-en' }}>
          <FormattedMessage id='back_home' defaultMessage='返回首頁' />
        </div>
      </div>
    </div>)
  }
}

export default App
